import { View } from "@tarojs/components";
import ByIcon from "./ByIcon";
import { ReactNode } from "react";

type ByPickerCellProps = {
  children?: ReactNode;
};

type ByPickerCellEvent = {
  onClick?: () => void;
};

export default ({
  children,
  onClick,
}: ByPickerCellProps & ByPickerCellEvent) => {
  return (
    <View className="flex items-cneter h-[1em]" onClick={onClick}>
      <View className="flex-auto">{children}</View>
      <ByIcon name="ArrowBottom" />
    </View>
  );
};
